package com.smh.a01GenericsDemo1;

import java.util.ArrayList;

public class GenericsDemo2 {
    public static void main(String[] args) {

        MyArrayList<String> myArrayList = new MyArrayList<>();

        myArrayList.add("asd");
        System.out.println(myArrayList.get(0));
        System.out.println(myArrayList.toString());

        MyArrayList<Integer> myArrayList2 = new MyArrayList<>();

        myArrayList2.add(12);
        Integer x = myArrayList2.get(0);
        System.out.println(x);
        System.out.println(myArrayList2.toString());

        ArrayList<String> arrayList = new ArrayList<>();
        ListUtil.addAll(arrayList,"12","123","231","asd","zxc");
        System.out.println(arrayList);

    }
}
